package com.firebird.app.kotlin.stock.ui.success

import android.R
import android.view.KeyEvent
import android.view.View
import android.widget.LinearLayout
import android.widget.TextView
import butterknife.BindView
import butterknife.OnClick
import com.firebird.app.kotlin.stock.MainActivity
import com.firebird.app.kotlin.stock.base.BaseActivity
import com.firebird.app.kotlin.stock.ui.allocation_manage.AllocationManageActivity
import com.zabra.zl.R


class AllocationSuccessActivity : BaseActivity() {
    @BindView(R.id.back)
    var back: LinearLayout? = null
    @BindView(R.id.tv_title)
    var tvTitle: TextView? = null
    @BindView(R.id.tv_allocation_manage)
    var tvAllocationManage: TextView? = null
    @BindView(R.id.bt_deal)
    var btDeal: TextView? = null

    override val layoutId: Int
        get() = R.layout.activity_allocation_success

    override fun initView() {
        tvTitle!!.text = ""
    }

    @OnClick(R.id.back, R.id.tv_allocation_manage, R.id.bt_deal)
    fun onViewClicked(view: View) {
        when (view.id) {
            R.id.back -> toClass_EmptyTop(this, MainActivity::class.java)
            R.id.tv_allocation_manage -> toClass_EmptyTop(this, AllocationManageActivity::class.java)
            R.id.bt_deal -> {
            }
        }
    }

    override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            toClass_EmptyTop(this, MainActivity::class.java)
        }
        return true
    }
}